﻿using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MachineBuildingSystem
{
    public partial class BackConcreteForm : XtraForm
    {
        private string m_CurrentUser = "";
        public string CurrentUser
        {
            set { m_CurrentUser = value; }
        }
        private string m_Password = "";
        public string Password
        {
            set { m_Password = value; }
        }

        private List<long> m_ActionList = new List<long> ();
        public List<long> ActionList
        {
            set { m_ActionList = value; }
        }
        

        //当前发货列表
        private DataTable m_DeliveryDT = new DataTable();
        public DataTable DeliveryDT
        {
            get { return m_DeliveryDT; }
            set { m_DeliveryDT = value; }
        }

        private OrderInfo m_CurrentOrder = new OrderInfo();
        public OrderInfo CurrentOrder
        {
            get { return m_CurrentOrder; }
            set { m_CurrentOrder = value; }
        }

        public BackConcreteForm()
        {
            InitializeComponent();
        }

        private void BackConcreteForm_Load(object sender, EventArgs e)
        {
            this.Size = Screen.GetWorkingArea(this).Size;
            this.Location = new Point(0, 0);
            this.backConcrete.BackConcreteCloseEvent += backConcrete_BackConcreteCloseEvent;
        }

        void backConcrete_BackConcreteCloseEvent(object sender, EventArgs e)
        {
            this.Close();
        }

        public void RefeshBackConcrete()
        {
            this.backConcrete.RefreshBackConcrete(m_CurrentUser, m_Password, m_ActionList, m_DeliveryDT, m_CurrentOrder);
        }
    }
}
